package com.serverSite;

import java.io.IOException;
import java.net.ServerSocket;

public class ServerE {
	private static int port = 10004;//for tests
	public ServerE(){
		super();
	}
	
	@SuppressWarnings("static-access")
	public ServerE(int port) {
		this.port = port;
	}
	
	public static void main(String[] args) {
		try{
			ServerSocket serverSocket=new ServerSocket(port);
			System.out.println("j'ecoute le port ... "+port);
			while(true){
				Thread thread = new Thread(new ServerThreadSite(serverSocket.accept(),port));
				thread.start();
			}
		}catch (IOException e){
			System.err.println(e.getMessage());
		}
	}
}
